<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>分类页</title>
    <link rel="stylesheet" href="./css/common.css" />
    <link rel="stylesheet" href="./css/category.css" />

    <style>
      .cate-nav-body {
        width: 100vw;
        white-space: nowrap;
        overflow-x: scroll;
        overflow-y: hidden;
      }
      .cate-nav-body::-webkit-scrollbar {
        display: none;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="header">
        <div class="lt" onclick="javascript:history.go(-1)">&lt;</div>
        <div class="ct">商品列表</div>
        <div class="rt"></div>
      </div>
      <div class="flex-box">
        <div class="cate-nav">
          <div class="cate-nav-body">
            <div class="item active">
              <div class="name">子分类名</div>
            </div>
            <div class="item">
              <div class="name">子分类名</div>
            </div>
            <div class="item">
              <div class="name">子分类名</div>
            </div>
            <div class="item">
              <div class="name">子分类名</div>
            </div>
            <div class="item">
              <div class="name">子分类名</div>
            </div>
            <div class="item">
              <div class="name">子分类名</div>
            </div>
            <div class="item">
              <div class="name">子分类名</div>
            </div>
          </div>
        </div>
        <div>
          <div class="cate-item">
            <div class="h">
              <span class="name">分类名</span>
              <span class="desc">分类名描述</span>
            </div>
            <div class="b">
              <!-- 商品列表 -->
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- nav 模板 -->
    <script type="text/html" id="tpl-nav">
      {{each brotherCategory }}
      <div
        class="item {{ $imports.categoryId == $value.id ? 'active' : '' }}"
        data-categoryid="{{$value.id}}"
      >
        <div class="name">{{$value.name}}</div>
      </div>
      {{/each}}
    </script>

    <script type="text/html" id="tpl-goodslist">
      {{each data}}
      <a class="item" href="./goods.html?goodsid={{ $value.id }}">
        <img class="img" src="{{$value.list_pic_url}}" />
        <span class="name">{{$value.name}}</span>
        <span class="price">￥{{$value.retail_price}}</span>
      </a>
      {{/each}}
    </script>
    <script src="./js/jquery.js"></script>
    <script src="./js/template-web.js"></script>
    <script src="./js/chengxianchao/axios.min.js"></script>
    <script src="./js/chengxianchao/baseApi.js"></script>
    <script src="./js/chengxianchao/category.js"></script>
  </body>
</html>
